#pragma once

/*
	A region represents a cell on the worldspace map.
*/

#include "../Math/Vec2i.h"
#include <string>
#include <memory>
#include <vector>

template<class T>
struct Vector2d
{
	typedef std::vector<std::vector<T>> Type;
};

namespace World
{
	class AreaCell;
	typedef std::shared_ptr<AreaCell> AreaCellPtr;

	class AreaData
	{
	public:
		std::string name;

		Vec2i topLeftCell;
		Vec2i bottomRightCell;
		Vec2i nbCells;
		Vector2d<AreaCellPtr> cells;
	};
	typedef std::unique_ptr<AreaData> AreaDataUPtr;

	class Area
	{
	public:
		Area();
		~Area();

		bool isGenerated() const { return (data != nullptr); }
		void generate();

	private:
		AreaDataUPtr data;
	};
}
